from datetime import datetime

now = datetime.now()
print(now, type(now))

dt = datetime(2024, 12, 30, 8, 30)
print(dt, type(dt))
print(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second)

print(now > dt)
print('*'*20)

s = now.strftime('%Y/%m/%d %H:%M:%S')
print(s, type(s))
print('*'*20)

s_time = "2025年5月1日 10点30分"
dt2 = datetime.strptime(s_time, "%Y年%m月%d日 %H点%M分")
print(dt2, type(dt2))



